//////////////////////////////////////////////////////////////////////////
// Author:		Dan Polak
// Date:		3/9/2010
// Last Mod:	N/A
//
// File:		Camera.h
//
// Purpose:		Declare functionality for the camera class. This camera
//				will be able to move up, down, left, right, forwards,
//				backwards, and rotate left, right, up and down. There will
//				also be functionality to set the camera to be axis aligned
//				and to set the camera to the origin as axis aligned.
//////////////////////////////////////////////////////////////////////////

#ifndef _CAMERA_H
#define _CAMERA_H

#include "Math.h"

enum AXES{X_AXIS, Y_AXIS, Z_AXIS};

class CCamera
{
private:
	vec3f m_vUp;
	vec3f m_vForward;
	vec3f m_vOrigin;

	static CCamera* m_pInstance;
protected:


public:
	//Accessor
	vec3f GetOrigin()	{return m_vOrigin;}
	vec3f GetForward()	{return m_vForward;}

	static CCamera* GetInstance(void);

	void CameraInit(vec3f Up, vec3f Forward, vec3f Origin);
	void CameraInit();

	void TranslateCamera(vec3f vTranslate);

	void RotateCamera(float fDegrees, int nAxis);

	void ApplyTransform();

	void SetAxes(vec3f Yvec, vec3f Zvec);

	//Mutator
	void SetYValue(float f) {m_vOrigin.y = f;}
	void SetOrigin(vec3f v)	{m_vOrigin.x = v.x; m_vOrigin.y = v.y; m_vOrigin.z = v.z;}
	void SetForward(vec3f v) {m_vForward = v;}
	matrix4f MakeMatrix();
};

#endif